package com.itheima.reggie.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.itheima.reggie.util.LocalDateTimeConverter;
import com.itheima.reggie.util.StateConverter;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单
 */
@Data
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;
    @ExcelProperty(value = "id", index = 0)
    private Long id;

    //订单号
    @ExcelProperty(value = "number", index = 1)
    private String number;

    //订单状态 1待付款，2待派送，3已派送，4已完成，5已取消
    @ExcelProperty(value = "status", index = 2)
    private Integer status;


    //下单用户id
    @ExcelProperty(value = "userId", index = 3)
    private Long userId;

    //地址id
    @ExcelProperty(value = "addressBookId", index = 4)
    private Long addressBookId;


    //下单时间
    @ExcelProperty(value = "orderTime", index = 5,converter = LocalDateTimeConverter.class)
    private LocalDateTime orderTime;


    //结账时间
    @ExcelProperty(value = "checkoutTime", index = 6,converter = LocalDateTimeConverter.class)
    private LocalDateTime checkoutTime;


    //支付方式 1微信，2支付宝
    @ExcelProperty(value = "payMethod", index = 7,converter = StateConverter.class)
    private Integer payMethod;


    //实收金额
    @ExcelProperty(value = "amount", index = 8)
    private BigDecimal amount;

    //备注
    @ExcelProperty(value = "remark", index = 9)
    private String remark;

    //用户名
    @ExcelProperty(value = "userName", index = 10)
    private String userName;

    //手机号
    @ExcelProperty(value = "phone", index = 11)
    private String phone;

    //地址
    @ExcelProperty(value = "address", index = 12)
    private String address;

    //收货人
    @ExcelProperty(value = "consignee", index = 13)
    private String consignee;
}
